﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Deployment.Application;

namespace Camping_Project.Forms
{
    public partial class FormEmploye : Form
    {
        private int idEmploye;
        private string nomPrenom;
        public FormEmploye(int id,string nomPrenom)
        {
            this.idEmploye = id;
            this.nomPrenom = nomPrenom;
            InitializeComponent();
        }

        private void FormEmploye_Load(object sender, EventArgs e)
        {
            //Convertissage d'un int en String :)
            labID.Text = Convert.ToString(idEmploye) +" : "+ nomPrenom;
            FormFondEcran fde = new FormFondEcran();
            fde.MdiParent = this;
            fde.PerformLayout();
            fde.Show();
            //MessageBox.Show(Environment.CurrentDirectory + @"\Music.mp3");

            //BONUSSSSS !!!
            //System.Diagnostics.Process.Start(Environment.CurrentDirectory+@"\Music.mp3");


        }

        private void ajouterClientToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormCreationClient fcc = new FormCreationClient();
            fcc.MdiParent = this;
            fcc.PerformLayout();
            fcc.Show();
        }

        private void encoderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormEncoder fe = new FormEncoder(idEmploye);
            fe.MdiParent = this;
            fe.PerformLayout();
            fe.Show();
        }

        private void modifierToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormModifierClient fmc = new FormModifierClient(this);
            fmc.MdiParent = this;
            fmc.PerformLayout();
            fmc.Show();
          
        }

        public ToolStripProgressBar getProgressBar()
        {
            return progressBar;
        }

        private void consulterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormConsulter fc = new FormConsulter();
            fc.MdiParent = this;
            fc.PerformLayout();
            fc.Show();
        }

        private void facturationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormFacturation ff = new FormFacturation();
            ff.MdiParent = this;
            ff.PerformLayout();
            ff.Show();  
        }

        private void ajouterEmplacementToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormAjouterEmplacement fae = new FormAjouterEmplacement();
            fae.MdiParent = this;
            fae.PerformLayout();
            fae.Show();
        }

        private void validerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
            FormValider fv = new FormValider(idEmploye);
            fv.MdiParent = this;
            fv.PerformLayout();
            fv.Show();
            
        }

        private void consulterToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            FormStatistiques fs = new FormStatistiques();
            fs.MdiParent = this;
            fs.PerformLayout();
            fs.Show();
        }



    }
}
